<template>
  <n-page-header class="home-header" subtitle="首页" @back="backPage">
    <div class="home-container">
      <n-button type="primary" @click="goDetailPage"> 去detail页面 </n-button>
    </div>
  </n-page-header>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router';

const router = useRouter();
const goDetailPage = () => {
  router.push('/detail');
};
const backPage = () => {
  router.back();
};
</script>

<style scoped lang="less">
.home-header{
    padding: 0;
    height: 100%;
}
</style>
